package com.turing.data.scripts.contract.transfer

import com.turing.data.vo.out.review.DependParamsVO
import com.turing.data.vo.out.review.TaskElementVO


class IfRequirement_30178_10_transfer {

    static List< TaskElementVO.DrawResultVO > doConvert(List< TaskElementVO.DrawResultVO > resultVOs, DependParamsVO dependParams){

        for( drawResultVO in resultVOs ) {
                def childTaskSn = drawResultVO.childTaskSn
                if(null == childTaskSn || childTaskSn == ""){
                    continue
                }
            String modelValue = drawResultVO.text
            String REGEX_BEFORE = "初始销售期间认购款项及利息的处理方式投资者的认购参与款项（不含认购费用）"
            String REGEX_AFTER = "加计其在初始销售期形成的利息将折算为资产管理计划份额归投资者所有"
            String str = modelValue.replaceAll("\n", "").replaceAll("\r", "")

            if (str.contains(REGEX_BEFORE)||str.contains(REGEX_AFTER)) {
                drawResultVO.businessValue =  "是"
                drawResultVO.type = 1
            } else {
                drawResultVO.businessValue = "否"
                drawResultVO.type = 1
            }
        }

        return resultVOs
    }

}
